#include<iostream>
#include<sys/types.h>
#include<sys/stat.h>
#include<string>
#include<unistd.h>
#include<fcntl.h>
#include"comm.hpp"
int main()
{
    
    int fd = open(FIFO_FILE,O_WRONLY);
    if(fd < 0)
    {
        std::cerr << "open fifo error" << std::endl;
        return 2;
    }
    while(true)
    {
        std::cout << "please Enter#";
        std::string message;
        std::cin >> message;
        int n = write(fd,message.c_str(),message.size());
        if(n > 0)
        {
            
        }
    }
    close(fd);
    return 0;
}